<template>
  <div id="FlashApproval">
    <div>sdfasdfasf</div>
  </div>
</template>

<script>
  // import { mapState, mapMutations, mapActions } from 'vuex'
  import EolApplicationList from '@/views/eolApplicationDetail/EolApplicationList.vue'
  import WritingApplicationList from '@/views/writingApplicationDetail/WritingApplicationList.vue'
  export default {
    name: 'FlashApproval',
    components: {
      WritingApplicationList,
      EolApplicationList,
    },
    // mixins: [validMixins],
    props: {
      // treeData: Array,
    },
    // mixins: [validMixins],
    data() {
      return {
        activeType: 1, //1EOL //2整车
      }
    },
    computed: {
      // ...mapState('user', ['token', 'userInfo'])
    },
    watch: {
      // 'cmAddForm.enginePlatform': function(val) {
      //   console.log('enginePlatformval', val)
      //   if (val) {
      //     this.emissionOptionReq()
      //   }
      // }
    },
    created() {

    },
    mounted() {
      // this.initPageLoad();
    },
    methods: {
      //通过拦截url进行拦截
      loadURL(url) {
        var iFrame;
        iFrame = document.createElement("iframe");
        iFrame.setAttribute("src", url);
        iFrame.setAttribute("style", "display:none;");
        iFrame.setAttribute("height", "0px");
        iFrame.setAttribute("width", "0px");
        iFrame.setAttribute("frameborder", "0");
        document.body.appendChild(iFrame);
        // 发起请求后这个iFrame就没用了，所以把它从dom上移除掉
        iFrame.parentNode.removeChild(iFrame);
        iFrame = null;
      },
      onClickLeft(){
        //调用原生的返回
        this.loadURL("localaccess://goback");
      },
      clickNavItem(type){
        this.activeType=type;
      },
    }
  }
</script>

<style lang="scss" scoped>
  #FlashApproval {
    background-color: #F0EFF4;
    /*height: 100vh;*/
  }
  .flashApproval-top-nav {
    padding: 0px 40px;
    background-color: #5169B1;
    h5{
      position: relative;
      padding:20px 0;
    }
    .active-item {
      color: #fff;
      font-weight: bold;
    }
    .btn-bar{
      position: absolute;
      bottom: 0;
      right: 0;
      width: 100%;
      height: 4px;
      border-radius: 3px;
      background-color: #e4393c;
    }
  }
  /*搜索*/
  .flashApproval-search {
    flex-wrap: wrap;
  }
  .search-btn {
    margin-right: 10px;
    margin-top: 10px;
    text-align: center;
    height: 30px;
    border-radius: 6px;
    line-height: 30px;
    width: 90px;
    font-size: 14px;
    color: #fff;
    background-color: #F95A2C;
  }
  /*列表*/
  .flashApproval-list {
    margin-top: 20px;
  }
  //每个列表的item
  .flashApproval-list-item {
    background-color: #fff;
    padding: 15px 10px;
    margin:0 4px;
    margin-bottom: 10px;
    border-radius: 4px;
    .list-item-top {
      flex-wrap: wrap;
      h4 {
        font-size: 15px;
        margin-bottom: 15px;
        font-weight: 500;
        width: 40vw;
      }
    }
    //底部申请时间的审批按钮
    .list-item-btn{
      span{
        color: #666;
        font-size: 15px;
      }
      //审批按钮
      .sp-btn{
        text-align: center;
        height: 30px;
        border-radius: 6px;
        line-height: 27px;
        width: 80px;
        font-size: 14px;
      }
      //待审批
      .ds-btn{
        padding:4px 4px;
        border-radius: 4px;
        color: #F95A2C;
        border:1px solid #F95A2C
      }
      //已通过
      .tg-btn{
        padding:4px 4px;
        border-radius: 4px;
        color: #728FBA;
        border:1px solid #728FBA
      }
    }
  }
  .all-select-btn{
    background-color: #fff;
    width: 180px;
    height: 40px;
    line-height: 38px;
    text-align: center;
    font-size: 16px;
    color:#999;
  }
  .freshScroll{
    max-height: 70vh;
    overflow-y: auto;
  }
</style>

